<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/md5.asp"-->
<!--#include file="admin.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>left</title>
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<style>body {background-color: #eaece1;}</style>
<script type="text/javascript">
function change_bg(obj)
{
    var a=document.getElementById("Menu").getElementsByTagName("a");
    for(var i=0;i<a.length;i++)
    {
        a[i].className="";
    }
    obj.className="currentx";
}
</script>
</head>

<body>
<div class="left">
  <div class="menu" id="Menu">
  <%
  fid=request.QueryString("fid")
  if fid="" then 
    set rss=conn.execute("select id from menu where fid=0 order by sort asc")
	fid=rss("id")
	set rss=nothing
  end if
  set rsm=server.CreateObject("adodb.recordset")
  sql="select * from menu where fid="&fid&" and mark=1 and id in("&menu&") order by sort"
  rsm.open sql,conn,1,3
  if not rsm.eof then
  do while not rsm.eof
  %>  
  <ul>
      <h2><%=rsm("title")%></h2>
    <div>
		<%
        set rsmu=server.CreateObject("adodb.recordset")
        sql="select * from menu where fid="&rsm("id")&" and id in("&menu&") and mark=1 order by sort"
        rsmu.open sql,conn,1,3
        if not rsmu.eof then
        do while not rsmu.eof
        %>
    <li><a onclick="change_bg(this)" href="../<%=rsmu("url")%>" target="mainFrame"><%=rsmu("title")%></a></li>
		<%
        rsmu.movenext
        loop
        rsmu.close
        set rsmu=nothing
        end if		 
        %>
    </div>
  </ul>
  <%
  rsm.movenext
  loop
  rsm.close
  set rsm=nothing
  end if		 
  %>
  </div>
</div>
</body>
</html>
